package com.zzz.poker.controller;

import com.zzz.poker.netty.handler.WebSocketHandler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @BelongsProject: share
 * @BelongsPackage: com.zzz.poker.controller
 * @Author: zwq
 * @CreateTime: 2025-05-27  00:46
 * @Description: TODO
 * @Version: 1.0
 */
@RestController
@RequestMapping("/api/ws")
public class WebSocketController {

    @Autowired
    WebSocketHandler webSocketHandler;

    public String broadcast(String message)
    {
        webSocketHandler.broadcast(message);
        return "success";
    }
}
